package com.chinaway.mobile.dao;

import java.util.Date;
import java.util.List;

import com.chinaway.mobile.model.Account;
import com.chinaway.mobile.model.Group;
import com.chinaway.mobile.model.Sim;

public interface SimDao {
	//更新
	public void update(Sim sim);
	// 获取
	public Sim get(String mobile);
	
	
	/*
	 SELECT *
	FROM `table` AS t1 JOIN 
	(SELECT ROUND(RAND() * (
		(SELECT MAX(id) FROM `table`)-(SELECT MIN(id) FROM `table`)
	)+
	(SELECT MIN(id) FROM `table`)) AS id) AS t2
	WHERE t1.id >= t2.id
	ORDER BY t1.id LIMIT 1;
	*/

	//随机读取 10条数据
	public List<Account> rand(Date date);
	
	//读取某一时间添加的手机卡号
	public List<Account> findby(Date date);
	
	public List<Group> getbatchDate();
}
